package com.rawm.gen;


import com.rawm.gen.core.GeneratorBuilder;
import com.rawm.gen.entity.BaseEntity;
import com.rawm.gen.utils.common.DbMetaDataUtils;

import java.time.LocalDate;

public class MybatisGenerator {
    public static void main(String[] args) {
        LocalDate now = LocalDate.now();
        GeneratorBuilder.Condition condition = GeneratorBuilder.getCondition()
                .setDao(true)
                .setiService(true)
                .setMapper(true)
                .setEntity(true)
                .setServiceImpl(true)
                .setController(true)
                .setStruct(true)
                .setDto(true)
                .setPageQueryDto(true)
                .setVo(true);
        BaseEntity be = new BaseEntity();
        be.setAuthor("黄一男");
        be.setNow(now.getYear() + "-" + now.getMonthValue() + "-" + now.getDayOfMonth());

        be.setTableComment("付款申请明细");
        new GeneratorBuilder("FinancialPaymentApplyDetail", DbMetaDataUtils.getTable("financial_payment_apply_detail"), be).builder(condition);
//
//        be.setTableComment("潜在供应商表");
//        new GeneratorBuilder("PotentialSupplyUnit", DbMetaDataUtils.getTable("supplier_potential_supply_unit"), be).builder(condition);
//
//        be.setTableComment("潜在供应商银行信息表");
//        new GeneratorBuilder("PotentialSupplyUnitBank", DbMetaDataUtils.getTable("supplier_potential_supply_unit_bank"), be).builder(condition);
//
//        be.setTableComment("潜在供应商资质表");
//        new GeneratorBuilder("PotentialSupplyUnitCertificates", DbMetaDataUtils.getTable("supplier_potential_supply_unit_certificates"), be).builder(condition);
//
//        be.setTableComment("潜在供应商联系人地址表");
//        new GeneratorBuilder("PotentialSupplyUnitContact", DbMetaDataUtils.getTable("supplier_potential_supply_unit_contact"), be).builder(condition);
//
//        be.setTableComment("潜在供应商供货信息表");
//        new GeneratorBuilder("PotentialSupplyUnitSupply", DbMetaDataUtils.getTable("supplier_potential_supply_unit_supply"), be).builder(condition);
//
//        be.setTableComment("供应商附件信息表");
//        new GeneratorBuilder("SupplyUnitAttachments", DbMetaDataUtils.getTable("supplier_attachments"), be).builder(condition);


    }
} 
